﻿using System;
using System.Collections.Generic;

namespace YJKWndrStatisticsExcel.AreaTable.StatisticControler
{
	public class HouseSuiteAreaAnalyzeListBySuite
	{
		public HouseSuiteAreaAnalyzeListBySuite(HouseSuiteAreaAnalyzeListBySuite rhs)
		{
			this.m_SuiteName = rhs.m_SuiteName;
			this.m_Data = rhs.m_Data;
			this.m_Footing = rhs.m_Footing;
		}

		public HouseSuiteAreaAnalyzeListBySuite(string suiteName, List<HouseSuiteAreaAnalyzeRowData> data, HouseSuiteAreaAnalyzeRowData footing)
		{
			this.m_SuiteName = suiteName;
			this.m_Data = data;
			this.m_Footing = footing;
		}

		public void ToGridCellList(int colIndex, ref int startRowIndex, ref List<CellInfo> cells)
		{
			List<int> list = new List<int>();
			for (int i = 0; i < this.m_Data.Count + 1; i++)
			{
				list.Add(startRowIndex + i);
			}
			List<int> list2 = new List<int>();
			list2.Add(colIndex++);
			cells.Add(new CellInfo(list, list2, this.m_SuiteName));
			foreach (HouseSuiteAreaAnalyzeRowData houseSuiteAreaAnalyzeRowData in this.m_Data)
			{
				houseSuiteAreaAnalyzeRowData.ToGridCellList(colIndex, ref startRowIndex, ref cells);
			}
			this.m_Footing.ToGridCellList(colIndex, ref startRowIndex, ref cells);
		}

		public string m_SuiteName;

		public List<HouseSuiteAreaAnalyzeRowData> m_Data;

		public HouseSuiteAreaAnalyzeRowData m_Footing;
	}
}
